package com.gmu.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gmu.domain.vo.BeSampleUnitsActivitiesVo;
import com.gmu.pojo.BeSampleUnitsActivities;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gmu.pojo.SampleUnitsActivities;
import com.gmu.pojo.TblActivities;
import com.gmu.pojo.TblSampleAddress;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 被采样单位活动表 Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2022-07-24
 */
public interface BeSampleUnitsActivitiesMapper extends BaseMapper<BeSampleUnitsActivities> {

    List<TblSampleAddress> showReservationAddress(@Param("activitiesId") Integer activitiesId);

    List<BeSampleUnitsActivities> getTimeStamp(@Param("activitiesId") Integer activitiesId,
                                               @Param("addressId") Integer addressId,
                                               @Param("activitiesAddressId") Integer activitiesAddressId);

    Integer updatePeoples(@Param("beSampleId") Integer beSampleId,@Param("orderedPeoples") Integer orderedPeoples);

    List<BeSampleUnitsActivities> getAllBeSampleActivitiesByUnitsId(Map<String,Object> map);
    Integer getAllBeSampleActivitiesByUnitsIdTotal(Map<String,Object> map);

    List<BeSampleUnitsActivities> getAllBeSampleActivitiesByActivitiesId(Map<String,Object> map);

    Integer rollBackActivitiesBeSample(@Param("activitiesId") Integer activitiesId);

    Integer rollBackActivitiesOrder(@Param("activitiesId") Integer activitiesId);

    Integer rollBackActivitiesWindows(@Param("activitiesId") Integer activitiesId);

    Integer deleteActivitiesByIds(Integer[] beSampleIds);

    Integer updateActivitiesStatus(@Param("activitiesId") Integer activitiesId,@Param("status") Integer status);

    Integer updateOrderPeople(Integer peoples,Integer beSampleId);

    IPage<BeSampleUnitsActivities> getBeSampleUnitsActivitiesByActivitiesId(Page<BeSampleUnitsActivities> page,@Param("beSampleUnitsActivities") BeSampleUnitsActivitiesVo beSampleUnitsActivities,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    List<BeSampleUnitsActivitiesVo> getBeSampleUnitsActivitiesList(@Param("beSampleUnitsActivities") BeSampleUnitsActivitiesVo beSampleUnitsActivities,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

}
